#pragma once

#include "Computer.h"

class ComputerBuilder
{
public:
    ComputerBuilder()          = default;
    virtual ~ComputerBuilder() = default;

public:
    virtual void buildMainboard() = 0;
    virtual void buildScreen()    = 0;
    virtual void buildKeyboard()  = 0;
    virtual void buildMouse()     = 0;
    virtual void buildCPU()       = 0;
    virtual void buildGPU()       = 0;

public:
    void buildComputer()
    {
        m_computer = new Computer();
    }
    Computer *getComputer()
    {
        Computer *computer = m_computer;
        m_computer         = nullptr;
        return computer;
    }

protected:
    Computer *m_computer;
};